/*
 * @Author: TC
 * @Date: 2025-01-27 12:38:38
 * @Last Modified by: TC
 * @Last Modified time: 2025-06-06 18:01:00
 */

import { assetManager } from "cc";
import { nsEngineConst } from "./Const/EngineConst";

/**
 * 自定义引擎加载器
 */
export class CCDownloader {
    /**
     * 初始化
     */
    public init() {
        let binDownloader = assetManager.downloader["_downloadArrayBuffer"];
        assetManager.downloader.register(".wasm", binDownloader);
        for (let type of nsEngineConst.imageTypes) {
            assetManager.downloader.register(type, binDownloader);
        }
    }
}
